# @Version        : 1.0
# @Update Time    : 2024/9/15 20:44
# @File           : notice_model.py
# @IDE            : PyCharm
# @Desc           : 文件描述信息
from advanced_alchemy.base import BigIntAuditBase
from sqlalchemy.orm import mapped_column, Mapped
from sqlalchemy import String, LargeBinary


class SysNotice(BigIntAuditBase):
    """
    通知公告表
    """

    __tablename__ = "sys_notice"
    __table_args__ = {"comment": "通知公告表"}

    notice_title: Mapped[str] = mapped_column(
        String(50), nullable=False, comment="公告标题"
    )
    notice_type: Mapped[str] = mapped_column(
        String(1), nullable=False, comment="公告类型（1通知 2公告）"
    )
    notice_content: Mapped[str] = mapped_column(LargeBinary, comment="公告内容")
    status: Mapped[str] = mapped_column(
        String(1), default="0", comment="公告状态（1正常 2关闭）"
    )
    remark: Mapped[str | None] = mapped_column(String(255), comment="备注")
